<template>
	<view v-if="detail.img1">
		<image :src="detail.img1" mode=""></image>
		<view class="">
			{{ detail.proname }}
		</view>
	</view>
	<view v-else class="">
		<u-skeleton rows="3" title loading></u-skeleton>
		<u-skeleton rows="3" title loading></u-skeleton>
		<u-skeleton rows="3" title loading></u-skeleton>
	</view>
</template>

<script>
	import {
		getDetailData
	} from '../../api/home.js'

	export default {
		data() {
			return {
				detail: {}
			}
		},
		onLoad: function(option) {
			const _this = this
			const eventChannel = this.getOpenerEventChannel();
			// 监听proid事件，获取上一页面通过eventChannel传送到当前页面的数据
			eventChannel.on('proid', function(data) {
				// console.log(1234567890,data)
				getDetailData(data).then(res => {
					// 详情页面的数据
					// console.log(res.data)

					setTimeout(() => {
						_this.detail = res.data
					}, 3000)

				})
			})
		},
		methods: {

		}
	}
</script>

<style>

</style>